package com.linktrip.devicemanager.util;

import java.util.UUID;

public class StringTool {
	
	
	public static boolean isEmpty(String value) {
		if (null == value || "".equals(value))
			return true;
		return false;
	}

	public static boolean isEmpty(String... values) {
		if (null == values)
			return true;

		for (String tmp : values) {
			if (isEmpty(tmp))
				return true;
		}

		return false;
	}
	
	public static boolean isEmpty(int value) {
		if (value == 0)
			return true;

		return false;
	}
	
	public static boolean isEmpty(int... values) {
		if (null == values || values.length <= 0)
			return true;

		for (int tmp : values) {
			if (isEmpty(tmp))
				return true;
		}

		return false;
	}
	
	public static boolean isEmpty(long value) {
		if (value == 0l)
			return true;

		return false;
	}
	
	public static boolean isEmpty(long... values) {
		if (null == values || values.length <= 0)
			return true;

		for (long tmp : values) {
			if (isEmpty(tmp))
				return true;
		}

		return false;
	}
	
	public static String randStr32(){
		String uuid = UUID.randomUUID().toString().trim().replaceAll("-", "");  
        return uuid;  
	}
}
